home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
sw_42a.zip
/
SW-42.DOC
< prev
next >
Wrap
Text File
|
1992-02-29
|
49KB
|
1,099 lines
╔═══════════════════════════════════╗
║ ╟─┐
║ SW.EXE ║ │
║ Batch File Enhancement ║ │
║ Version 4.2a ║ │
║ ║ │
╚═╤═════════════════════════════════╝ │
└───────────────────────────────────┘
February 29, 1992
SW.EXE 4.2a
Warren Small
(c) 1992
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
SW.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
DI.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
NOTES ON DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
WINDOW APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
/F# Foreground Color /B# Background Color . . . . . . . . . . . 3
COLOR VALUES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
/L# Window Border (Lines) . . . . . . . . . . . . . . . . . . . . . 3
/S# Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
/W Wide Edge . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
/2 Double Spacing /0 No Margin . . . . . . . . . . . . . . . . 3
/R# Row /C# Column . . . . . . . . . . . . . . . . . . . . . . . 4
/H# Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
/D Draw Window . . . . . . . . . . . . . . . . . . . . . . . . . . 4
/Z Zoom Window . . . . . . . . . . . . . . . . . . . . . . . . . . 4
TEXT APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
/T# Text Color /G# Global Text Color . . . . . . . . . . . . . . 5
/E# Enhanced Text Color . . . . . . . . . . . . . . . . . . . . . . 5
/M# Border Message . . . . . . . . . . . . . . . . . . . . . . . . 5
/J# Justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SCREEN APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
/K# Klear Screen (with optional Fill Character) . . . . . . . . . . 6
/K# Klear Screen, set Foreground Color . . . . . . . . . . . . . . 6
/K# Klear Screen (with optional Fill String) . . . . . . . . . . . 6
/O# Outside Edge (Screen Border) . . . . . . . . . . . . . . . . . 6
OTHER SWITCHES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
/P# Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
/Q Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
/I# User Input . . . . . . . . . . . . . . . . . . . . . . . . . . 8
/N# Input Line Number . . . . . . . . . . . . . . . . . . . . . . . 9
/U Input Uppercase . . . . . . . . . . . . . . . . . . . . . . . . 9
/D Draw Window . . . . . . . . . . . . . . . . . . . . . . . . . . 9
/ch Fill Line . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
/A# Alert /A#,# Alert with Frequency, Duration . . . . . . . . . 10
DEFAULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
SCREEN DEFINITIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
TIPS AND TRICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
DI.EXE - Disk Information . . . . . . . . . . . . . . . . . . . . . . . . 15
SW.EXE History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
SW.EXE 4.2a
Warren Small
(c) 1992
INTRODUCTION
The batch file language for the IBM PC could be described as useful but
not much else. It is lacking a great deal in terms of flexibility. These 2
utilities, SW.EXE and DI.EXE, attempt to make batch files much more powerful
and at the same time make them nice to look at.
SW.EXE grew out of my hatred for the ECHO statement. Any time that I
needed to say something to the user, ECHO was the only way. It was slow and
difficult to make look halfway decent. And if I wanted color, there was
ANSI.SYS...
DI.EXE was introduced with SW 4.1 as a response to users who have been
utilizing SW as an install tool for software distribution. DI allows interro-
gation of the disk drives to determine if they are ready for whatever use you
had in mind. This way you can avoid hardware errors which can pop up in the
middle of your nice SW screens. See Page 15 for the details on using DI.
SW.EXE will display up to 20 lines of text in a window using either its
command line format or an external 'Screen Definition' file. With either
method, the color of each line can be defined separately or as a group. Also,
the colors for the window, its border, the screen background and its border
can be specified. Five different window borders are possible and the screen
background can be filled with characters or complete strings.
SW.EXE also provides functions for retrieving input from the user,
either single keystrokes or strings, controlling batch file execution through
branching and alerting the user with various sounds or even simple tunes.
Command Line Syntax:
SW [options] "text1" [options] ["text2"] [options] ["text3"] ...
External File Syntax:
SW @filename [label]
The biggest advantage to using the external file approach is that more
than one window can be displayed with only one call to SW! This can be a
tremendous speed advantage if the batch file is being run from a floppy disk.
The screen definition can also be written into the batch file that utilizes
it so that disk space is used optimally. The optional label shown above is
used to mark different definitions within the same file. The demo batch file,
SW42DEMO.BAT, contains many examples of both methods. See page 12 for more
information.
On the next page is a list of the various switches along with a short
description of what each does. This list appears on the screen when SW is
called without parameters.
Page 1
SW.EXE 4.2a
Warren Small
(c) 1992
OPTIONS
Window: /f# Foreground (0-15) /b# Background (0-7) /l# Border (0-5)
/s# Shadow (1-4) /w Wide Edge /2 Double Spacing /0 No Margin
/r# Row (1-25) /c# Col (1-80) /h# here + # /d Draw /z Zoom
Text: /t#|g# Text (0-15) /e# Enhanced Text /m# Border Msg /j# Justify
Screen: /k#[ ] Clear screen with color (0-7) [char] /o# Outside edge
Other: /p#[-] Pause /a#[,#] Alert (0-9) /q... Query /char Fill Line
/i# User Input /n# Input Line /u Uppercase
Switches can be in almost any order, upper or lower case (except /q and
/i, see page 7), and a space is required between each.
NOTES ON DOS
- There is a limit to the length of a command line whether it is typed
directly from the DOS prompt or inside a batch file. This limit is 128 char-
acters. Anything past that point will be ignored.
- The Query feature described on page 7 makes use of Errorlevel codes to
allow the batch file to determine which key has been pressed. A series of IF
ERROR